package com.netflexitysolutions.amazonws.ec2.internal.operations;

import com.amazonaws.ec2.doc._2009_04_04.DeleteSecurityGroupType;
import com.netflexitysolutions.amazonws.ec2.EC2;

public class DeleteSecurityGroupOperation extends SingleObjectOperationExecutor<DeleteSecurityGroupType, Boolean> {
	
	public DeleteSecurityGroupOperation(EC2 ec2, String name) {
		super(ec2, name);
	}

	@Override
	protected Boolean call(DeleteSecurityGroupType request) {
		request.setGroupName(objectId);
		return getEC2().getService().deleteSecurityGroup(request).isReturn();
	}

}
